﻿<Window x:Class="TerribleFate.EditWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="http://schemas.xceed.com/wpf/xaml/toolkit" WindowStyle="ToolWindow"
        xmlns:p="clr-namespace:TerribleFate.Properties"
        xmlns:local="clr-namespace:TerribleFate" SizeToContent="WidthAndHeight" WindowStartupLocation="CenterScreen"
        Title="{x:Static p:Resources.EditWindow}" >
    <Grid Margin="5">
        <Grid.Resources>
            <local:StringToTimeSpanConverter x:Key="stsp" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <GroupBox Header="{x:Static p:Resources.CountdownType}" Margin="5">
            <StackPanel Margin="5">
            <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{x:Static p:Resources.Name}" Margin="0,0,10,0" />
                <TextBox Width="150" Text="{Binding Name}" />
            </StackPanel>
            <!--<TextBlock Text="Beschreibung:" />
            <TextBox Height="50" AcceptsReturn="True" Text="{Binding Description}" />-->
        
            <Grid Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="2*" />
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="0" Margin="0,0,10,0">
                        <CheckBox Content="{x:Static p:Resources.Interval}" IsChecked="{Binding UseDuration,Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}"/>
                        <t:TimePicker Minimum="00:01"   Width="120" Value="{Binding Duration, Converter={StaticResource stsp}}" />
                </StackPanel>
                <StackPanel Grid.Column="1">
                        <CheckBox Content="{x:Static p:Resources.Date}" IsChecked="{Binding UseDate,Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}"/>
                        <t:DateTimePicker Value="{Binding EndDate}"  Name="datetimepicker" />
                </StackPanel>
            </Grid>
            </StackPanel>
        </GroupBox>
        <GroupBox Header="{x:Static p:Resources.Notification}" Grid.Row="1" Margin="5">
            <StackPanel Margin="5">
                <CheckBox Content="{x:Static p:Resources.PlaySound}" IsChecked="{Binding NotifyBySound}" />
                <StackPanel Orientation="Horizontal" Margin="20,0,0,0">
                    <!--<TextBox Width="170" Text="{Binding SoundToPlay, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}" Name="sndPath" />-->
                    <ComboBox IsEnabled="{Binding NotifyBySound}" IsEditable="False" Width="200" SelectedItem="{Binding SoundToPlay, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}" ItemsSource="{Binding BuiltInSounds}">
                        
                    </ComboBox>
                    <!-- <Button Content="{x:Static p:Resources.Browse}" Click="Button_Click_2" />-->
                </StackPanel>
                <!--<CheckBox Content="Tray-Benachrichtigung" IsChecked="{Binding NotifyByTray}" />-->
                <CheckBox Content="{x:Static p:Resources.OverlayNotify}" IsChecked="{Binding NotifyByOverlay}" />
                <!--<Separator />
                <StackPanel Orientation="Horizontal" >
                    <CheckBox Content="Benachrichtige vorher " />
                    <t:TimePicker  Width="120" Value="{Binding NotifyBefore, Converter={StaticResource stsp}}" />
                </StackPanel>
                <CheckBox Content="Blende Benachrichtigung automatisch aus" IsChecked="{Binding NotifyByOverlayFade}" />
                -->
            </StackPanel>
        </GroupBox>
        <GroupBox Header="{x:Static p:Resources.Action}" Grid.Row="2" Margin="5">
            <StackPanel Orientation="Horizontal" Margin="5">
                <TextBlock Text="{x:Static p:Resources.Program}" Margin="0,0,10,0" />
                <TextBox Width="170" Text="{Binding ExecuteString, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}" Name="execPath" />
                <Button Content="{x:Static p:Resources.Browse}" Click="Button_Click_3" />
            </StackPanel>
        </GroupBox>
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="{x:Static p:Resources.Save}" Click="Button_Click" Margin="0,0,10,0" />
            <Button Content="{x:Static p:Resources.Cancel}" Click="Button_Click_1" Margin="10,0,0,0" />
        </StackPanel>
    </Grid>
</Window>
